from tortoise.models import Model
from tortoise import fields


class BaseTable(Model):
    is_deleted = fields.BooleanField(default=0, description="是否删除")
    created_at = fields.DatetimeField(auto_now_add=True, description="创建时间")
    updated_at = fields.DatetimeField(auto_now=True, description="更新时间")

    class Meta:
        abstract = True  # 抽象模型，将不会在数据库中创建表
